package cn.iocoder.yudao.module.ai.controller.app.picturesort;

import cn.iocoder.yudao.module.ai.common.IdUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;

import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;

import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;

import cn.iocoder.yudao.module.ai.controller.admin.picturesort.vo.*;
import cn.iocoder.yudao.module.ai.dal.dataobject.picturesort.PictureSortDO;
import cn.iocoder.yudao.module.ai.service.picturesort.PictureSortService;

@Tag(name = "管理后台 - 图片分类")
@RestController
@RequestMapping("/app/ai/picture-sort")
@Validated
public class AppPictureSortController {

    @Resource
    private PictureSortService pictureSortService;


    @GetMapping("/page")
    @Operation(summary = "获得图片分类分页")
    public CommonResult<PageResult<PictureSortRespVO>> getPictureSortPage(@Valid PictureSortPageReqVO pageReqVO) {
        PageResult<PictureSortDO> pageResult = pictureSortService.getPictureSortPage(pageReqVO);
        return success(BeanUtils.toBean(pageResult, PictureSortRespVO.class));
    }

}